package fido.torrentsite;

/**
 * Created by IntelliJ IDEA.
 * User: Anders
 * Date: 09.06.11
 * Time: 12:05
 */

public class CookieVariable {
    private String key;
    private String displayName;
    private String value;

    public CookieVariable(String key, String displayName) {
        this.key = key;
        this.displayName = displayName;
        this.value = "";
    }

    public final String getKey() {
        return key;
    }

    public final String getDisplayNameAndKey() {
        return displayName + "(" + key + ")";
    }

    public final String getValue() {
        return value;
    }

    public final String getVariableText() {
        return key + "=" + value;
    }

    public final void setValue(String value) {
        if (value == null) {
            throw new IllegalArgumentException();
        }
        this.value = value;
    }
}
